﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using InventoryPro.BL;
using InventoryPro.DAL;

namespace InventryPro.Orders
{
    public partial class Orders : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OrderLogic orderBL = new OrderLogic();
                gridOrder.DataSource = orderBL.GetAllOrders();
                gridOrder.DataBind();
            }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            OrderLogic orderBL = new OrderLogic();
            SearchOrder searchObj;
            searchObj = new SearchOrder();
            searchObj.CustomerId = "CHOPS";
            searchObj.Id = 10248;
            gridOrder.DataSource = orderBL.Search(searchObj);
            gridOrder.DataBind();

        }

        protected void btnClear_click(object sender, EventArgs e)
        {

        }
    }
}